﻿using System;
using System.Collections.Generic;
using System.Text;

namespace T.FAS.Runtime.DataAccess.SPI
{
    /// <summary>
    /// 插件注入时机
    /// </summary>
    public enum InjectionPoint
    {
        /// <summary>
        /// 服务执行一开始
        /// </summary>
        Entry                   = 0b0000000001,
        /// <summary>
        /// 解析SQL DOM之前
        /// </summary>
        BeforeBuildSQLDOM       = 0b0000000010,
        /// <summary>
        /// 解析SQL DOM之后
        /// </summary>
        AfterBuildSQLDOM        = 0b0000000100,
        /// <summary>
        /// 解析DataContext之前
        /// </summary>
        BeforeBuildDataContext  = 0b0000001000,
        /// <summary>
        /// 解析DataContext之后
        /// </summary>
        AfterBuildDataContext   = 0b0000010000,
        /// <summary>
        /// 执行SQL之前
        /// </summary>
        BeforeExecuteSQL        = 0b0000100000,
        /// <summary>
        /// 执行SQL之后
        /// </summary>
        AfterBuildExecuteSQL    = 0b0001000000,
        /// <summary>
        /// 成功执行SQL之后
        /// </summary>
        ExecuteSQLSuccess       = 0b0010000000,
        /// <summary>
        /// 执行SQL失败之后
        /// </summary>
        ExecuteSQLFailed        = 0b0100000000,
        /// <summary>
        /// 调用完成之前
        /// </summary>
        Finish                  = 0b1000000000,
    }
}
